Image processing apparatus inserting image into insertion area, and image forming apparatus

ABSTRACT

An image processing apparatus includes an image input unit and a control unit. Through the image input unit, a first image including an insertion area and a second image different from the first image are input. The control unit functions as an image acquisition section, an insertion area detection section, an insertion image detection section, and an image processing section. The image acquisition section acquires the first image and the second image input through the image input unit. The insertion area detection section detects the insertion area from the first image. The insertion image detection section detects an insertion image from the second image. The image processing section generates a third image by inserting the insertion image into the insertion area.

INCORPORATION BY REFERENCE

This application claims priority to Japanese Patent Application No.2018-100726 filed on May 25, 2018, the entire contents of which areincorporated by reference herein.

BACKGROUND

The present disclosure relates to an image processing apparatus and animage forming apparatus, and particularly to a technique for creating animage.

Techniques for performing image processing of changing acquired imagesinto images desired by users are known in image processing apparatusesor the like.

For example, there is known a technique for extracting an object imageincluding an instructed object from images sequentially acquired by animage capturing device, and combining the extracted object image withthe sequentially acquired images, thereby sequentially generatingcombined images.

SUMMARY

As an aspect of the present disclosure, a technique obtained by furtherimproving the above-described technique is proposed.

An image processing apparatus according to an aspect of the presentdisclosure includes an image input unit and a control unit. Through theimage input unit, a first image including an insertion area representinga position for inserting an image and a second image different from thefirst image are input. The control unit includes a processor andfunctions, when the processor executes a control program, as an imageacquisition section, an insertion area detection section, an insertionimage detection section, and an image processing section. The imageacquisition section acquires the first image and the second image inputthrough the image input unit. The insertion area detection sectiondetects the insertion area from the first image acquired by the imageacquisition section. The insertion image detection section detects, fromthe second image acquired by the image acquisition section, an insertionimage to be inserted into the insertion area. The image processingsection generates a third image by inserting the insertion imagedetected by the insertion image detection section into the insertionarea detected by the insertion area detection section.

An image forming apparatus according to another aspect of the presentdisclosure includes the above-described image processing apparatus andan image forming unit. The image forming unit forms the third image on arecording medium.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a perspective view illustrating an appearance of an imageforming apparatus including an image processing apparatus according toan embodiment of the present disclosure.

FIG. 2 is a block diagram illustrating an internal configuration of theimage forming apparatus including the image processing apparatusaccording to the embodiment of the present disclosure.

FIG. 3 is a flowchart illustrating image insertion processing.

FIG. 4 is a flowchart illustrating the image insertion processing.

FIG. 5 illustrates an example of a home screen.

FIG. 6 illustrates an example of a first image.

FIG. 7 illustrates an example of a second image.

FIG. 8 illustrates an example of an error screen.

FIG. 9 illustrates an example of a third image.

FIG. 10 illustrates another example of the first image.

FIG. 11 illustrates another example of the second image.

FIG. 12 illustrates another example of the third image.

FIG. 13 illustrates another example of the error screen.

DETAILED DESCRIPTION

An image forming apparatus according to an embodiment of the presentdisclosure will be described below with reference to the drawings. FIG.1 is a perspective view illustrating an appearance of the image formingapparatus including an image processing apparatus according to anembodiment of the present disclosure. In the following description,“image” indicates “image data”.

An image forming apparatus 1 is a multi-function peripheral having aplurality of functions such as a facsimile function, a copy function, aprinter function, and a scanner function. In the present embodiment, theimage forming apparatus 1 has a function that when a first imageincluding an insertion area indicating a position for inserting an imageand a second image different from the first image are acquired,generates a third image by inserting an insertion image detected fromthe second image into the insertion area detected from the first image(hereinafter the function is referred to as “image insertionprocessing”).

Referring to FIG. 1, a housing 7 of the image forming apparatus 1accommodates a plurality of devices for implementing various functionsof the image forming apparatus 1. For example, the housing 7accommodates, for example, an image reading unit 11, an image formingunit 12 (not illustrated in FIG. 1), a fixing unit 13 (not illustratedin FIG. 1), a sheet feeding unit 14.

The image reading unit 11 is an auto document feeder (ADF) including adocument conveyance unit 6 that conveys a document, and a scanner thatoptically scans the document conveyed by the document conveyance unit 6,or a document placed on a contact glass which is not illustrated. Theimage reading unit 11 irradiates the document with light by a lightirradiation unit, and by receiving the reflected light a charge-coupleddevice (CCD) sensor to read the document, thereby generating an image.The image reading unit 11 is an example of an image input unit describedin the claims.

The image forming unit 12 includes a photosensitive drum, a chargingdevice, an exposure device, a development device, and a transfer device.The image forming unit 12 forms a toner image on recording papersupplied from the sheet feeding unit 14 based on, for example, imagesgenerated by the image reading unit 11, or images sent from a personalcomputer and another device such as a facsimile device which areconnected via a network.

The fixing unit 13 heats and pressurizes the recording paper on whichthe toner image has been formed by the image forming processingperformed by the image forming unit 12, thereby fixing the toner imageon the recording paper. After the toner image is fixed by the fixingunit 13, the recording paper on which the image has been formed isdischarged onto a discharge tray 8.

The sheet feeding unit 14 draws out, one by one, recording paperaccommodated in a sheet cassette, or recording paper placed on a manualfeed tray by a pick-up roller, and delivers the recording paper to theimage forming unit 12.

The image forming apparatus 1 includes an operation unit 15 that islocated near the image reading unit 11 and on the front side of theimage forming apparatus 1. A user inputs, through the operation unit 15,instructions or the like for various functions, which can be executed bythe image forming apparatus 1. The operation unit 15 includes a display16. The display 16 is a display device including a liquid crystaldisplay. The display 16 displays various screens for various functionsthat can be executed by the image forming apparatus 1. The operationunit 15 includes a touch panel 15A disposed as to overlap the display16. The touch panel 15A detects user's operation performed by variousoperation methods such as a touch operation and a drag operation.

FIG. 2 is a block diagram illustrating an internal configuration of theimage forming apparatus including the image processing apparatusaccording to the embodiment of the present disclosure. Referring to FIG.2, the image forming apparatus 1 includes a control unit 10. The controlunit 10 includes, for example, a processor, a random access memory(RAM), and a read only memory (ROM). The processor is, for example, acentral processing unit (CPU), a micro processing unit (MPU), or anapplication specific integrated circuit (ASIC). When the above-describedprocessor executes a control program stored in a built-in ROM or harddisk drive (HDD) 19, the control unit 10 functions as a control section10A, an image acquisition section 10B, an insertion area detectionsection 10C, an insertion image detection section 10D, and an imageprocessing section 10E.

The control unit 10 is electrically connected to each of the documentconveyance unit 6, the image reading unit 11, the image forming unit 12,the fixing unit 13, the sheet feeding unit 14, the operation unit 15, animage generation unit 17, an image memory 18, the HDD 19, a facsimilecommunication unit 20, and a communication unit 21. In the presentembodiment, the document conveyance unit 6, the image reading unit 11,the operation unit 15, the display 16, the communication unit 21, andthe control unit 10 function as an image processing apparatus 2 forimplementing image insertion processing.

The control section 10A controls the entirety of the image formingapparatus 1. More specifically, the control section 10A executesprocessing such as the operation of each unit of the image formingapparatus 1 and communication with an information processing apparatus,such as a personal computer (PC) 22, which is connected thereto via anetwork.

The image generation unit 17 executes image processing, as needed, onthe image generated by the image reading unit 11, and generates an imageon which the image processing has been performed.

The image memory 18 includes an area for temporarily storing an image tobe printed that is generated by the image reading unit 11.

The HDD 19 is a large-capacity storage device that stores various dataincluding the image generated by the image reading unit 11. The HDD 19stores various computer programs for implementing general operations ofthe image forming apparatus 1.

The HDD 19 also stores a control program for executing the imageinsertion processing according to the present embodiment. Theabove-described processor operates based on the control program, therebyexecuting as the control section 10A, the image acquisition section 10B,the insertion area detection section 10C, the insertion image detectionsection 10D, and the image processing section 10E, the image insertionprocessing according to the present embodiment. The image insertionprocessing is not limited to the operation based on the computerprogram, but instead may be operable by a hardware circuit.

The facsimile communication unit 20 connects to a public line andtransmits and receives images via the public line.

The communication unit 21 includes a communication module such as alocal area network (LAN) board. The image forming apparatus 1 performsdata communication with the information processing apparatus on thenetwork, such as the personal computer 22, through the communicationunit 21. The communication unit 21 is an example of the image input unitdescribed in the claims.

A power supply is connected to each unit of the image forming apparatus1. Each unit of the image forming apparatus 1 operates when power issupplied to each unit of the image forming apparatus 1 from the powersupply.

[Operation]

FIGS. 3 and 4 are flowcharts each illustrating the image insertionprocessing. A control structure of a control program for executing theimage insertion processing and the operation of the image formingapparatus 1 will be described below. This control program is executed insuch a manner that the user selects an image insertion function byinputting an instruction through the operation unit 15.

When the image forming apparatus 1 is powered on, the control section10A causes the display 16 to display a home screen for selecting any oneof a plurality of functions that can be executed by the image formingapparatus 1. FIG. 5 illustrates an example of the home screen. Referringto FIG. 5, a home screen 30 includes, as software keys, a key 31 forselecting the copy function, a key 32 for selecting the scannerfunction, a key 33 for selecting the facsimile function, and a key 34for selecting the image insertion function.

(1) In the case of acquiring the first and second images through areading operation by the image reading unit 11, the user first pressesthe key 32, thereby making the scanner function available. The userplaces a first document on, for example, the contact glass of the imagereading unit 11, and inputs a document reading instruction through theoperation unit 15.

FIG. 6 illustrates an example of the first image. Referring to FIG. 6, afirst image 42 is image data generated based on a first document 40. Thedata structure of the first image 42 will be described below using thefirst document 40. The first image 42 includes insertion areas 44, 46,and 48 in that order from one end side in a first predetermineddirection toward the other end side in the first direction. Theinsertion area 44, the insertion area 46, and the insertion area 48 arerectangular areas each representing a position where an image isinserted.

In the present embodiment, the image processing section 10E executes, asthe image insertion processing, image processing on the insertion areas44, 46, and 48 in order from the insertion area located at one end sidein the first direction to the insertion area located at the other endside in the first direction. Hereinafter, the insertion areas are eachdenoted by an ordinal number in the order in which the image insertionprocessing is to be executed.

When the document reading instruction is input through the operationunit 15, the image acquisition section 10B causes the image reading unit11 to read the first document 40, and generate the first imagecorresponding to the first image 42. The image acquisition section 10Bacquires the generated first image and stores the first image in the HDD19.

After the first document 40 is read, the user places a second documentincluding a second image on the contact glass of the image reading unit11, and inputs the document reading instruction through the operationunit 15.

FIG. 7 illustrates an example of the second image. Referring to FIG. 7,a second image 51 is image data generated based on a second document 50.The data structure of the second image 51 will be described below usingthe second document 50. The second image 51 includes insertion images52, 54, and 56 to be inserted into the insertion areas 44, 46, and 48,respectively, in that order from one end side in a second predetermineddirection toward the other end side in the second direction. All theinsertion images 52, 54, and 56 are color images formed using yellow(Y), magenta (M), cyan (C), and black (K).

In the present embodiment, the image processing section 10E executes, asthe image insertion processing, image processing on the insertion imagesin order from the insertion image located at one end side in the seconddirection toward the insertion image located at the other end side inthe second direction. Hereinafter, the insertion images are each denotedby an ordinal number in the order in which the image insertionprocessing is to be executed.

When the document reading instruction is input through the operationunit 15, the image acquisition section 10B causes the image reading unit11 to read the second document 50 and generate the second imagecorresponding to the second image 51. The image acquisition section 10Bacquires the generated second image and stores the second image in theHDD 19.

As described above, the image acquisition section 10B acquires the firstimage 42 and the second image 51 in such a manner that the image readingunit 11 reads the first document and the second document.

After the second document 50 is read, when the user inputs aninstruction to finish the use of the scanner function through theoperation unit 15, the control section 10A causes the display 16 todisplay the home screen 30 again. The user presses the key 34 to use theimage insertion function. When the key 34 is pressed, the controlsection 10A accepts the selection of the image insertion function, andcauses the display 16 to display, for example, a message to prompt theuser to select the first image and the second image.

Referring to FIG. 3, when the user who has checked the message selectsthe first image and second image stored in the HDD 19 by inputting aninstruction through the operation unit 15, the control section 10Adetermines that the first image and the second image have already beenacquired (YES in step S10), and the control section 10A substitutes “1”into a variable “i” and substitutes “1” into a variable “j” (step S11).The variable “i” is a value indicating the ordinal number to be denotedto each insertion area included in the first image in the order in whichthe image insertion processing is to be executed. The variable “j” is avalue indicating the ordinal number to be denoted to each insertionimage included in the second image in the order in which the imageinsertion processing is to be executed.

When the control section 10A performs the substitution as describedabove, the insertion area detection section 10C detects the insertionareas 44, 46, and 48 from the first image 42 based on the first image,and the insertion image detection section 10D detects the insertionimages 52, 54, and 56 from the second image 51 based on the second image(step S12). In detecting the insertion areas, the insertion areadetection section 10C detects a line that forms the boundary of theinsertion area, the type of the line, the presence or absence of a lineand figure included in the insertion area, and the type of the figure.

The control section 10A determines whether the number of insertion areasdetected by the insertion area detection section 10C matches the numberof insertion images detected by the insertion image detection section10D (step S13). In this case, the number of the insertion areas 44, 46,and 48 is “3” and the number of the insertion images 52, 54, and 56 is“3”. Accordingly, the control section 10A determines that the number ofthe insertion areas is equal to the number of the insertion images (YESin step S13), and then determines whether the boundary of the firstinsertion area is represented by a discontinuous line (step S14).

If the control section 10A determines that the number of the insertionareas does not match the number of the insertion images (NO in stepS13), on the other hand, the control section 10A causes the display 16to display an error screen (step S15).

FIG. 8 illustrates an example of the error screen. Referring to FIG. 8,an error screen 60 includes a message 62 indicating a warning that “thenumber of insertion images does not match the number of insertionareas.” After the error screen 60 is displayed, the image insertionprocessing ends.

(1-1) When the Boundary of the Insertion Area is Represented by aDiscontinuous Line

Referring to FIG. 6, in the first image 42, the boundary between thefirst insertion area 44 and an image portion different from theinsertion area 44 is represented by a broken line 44A as a discontinuousline. The insertion area 44 does not include any figure and any linesegment. Accordingly, the control section 10A determines that theboundary of the first insertion area is represented by a discontinuousline (YES in step S14), and the control section 10A also determines thatthe first insertion area does not include any triangular figure, anycircular figure, and any diamond-shaped figure (NO in step S19, stepS21, and step S24). When the above-described determination is made bythe control section 10A, the image processing section 10E stores thefirst insertion image 52 in the HDD 19 as the first insertion image(step S26).

Specifically, the image processing section 10E stores the firstinsertion image 52 in the HDD 19 without executing, on the insertionimage 52 detected by the insertion image detection section 10D, theprocessing of changing the size of the insertion image 52.

After the first insertion image is stored, the control section 10Adetermines whether the first image includes the next insertion area(step S27). Since the first image 42 includes the second insertion area46, the control section 10A determines that the first image includes thenext insertion area (YES in step S27), and adds “1” to the variable “i”and adds “1” to the variable “j” (step S28). As a result, the variable“i” becomes “2” and the variable “j” becomes “2”.

(1-2) When the Boundary of the Insertion Area is Represented by a SolidLine

(1-2-1) When the Insertion Area Includes Nothing

Referring to FIG. 6, in the first image 42, the boundary between thesecond insertion area 46 and an image portion different from theinsertion area 46 is represented by a solid line 46A as a continuousline. The insertion area 46 does not include any figure and any linesegment. Accordingly, the control section 10A determines that theboundary of the second insertion area is not represented by adiscontinuous line (NO in step S14), and also determines that the secondinsertion area does not include a line (hereinafter referred to as a“dividing line”) that divides the insertion area (NO in step S16). Whenthe above-described determination is made by the control section 10A,the image processing section 10E executes, on the second insertion image54, processing (hereinafter referred to as “size change processing”) ofchanging the size of the insertion image 54 in matching with the size ofthe insertion area 46 (step S17).

Specifically, since the insertion image 54 is larger than the insertionarea 46, the image processing section 10E executes processing ofreducing the size of the insertion image 54, which is detected by theinsertion image detection section 10D, so that the size of the insertionimage 54 matches the size of the insertion area 46.

After the size change processing is executed, the control section 10Adetermines that the second insertion area does not include anytriangular figure, any circular figure, and any diamond-shaped figure(NO in step S19, step S21, and step S24), and stores the insertion image54, on which the size change processing has been executed, in the HDD 19as the second insertion image (step S26).

After the second insertion image is stored, the control section 10Aexecutes the processing of steps S27 and S28 in a similar manner asdescribed above. As a result, the variable “i” becomes “3” and thevariable “j” becomes “3”.

(1-2-2) When the Insertion Area Includes a Dividing Line

Referring to FIG. 6, in the first image 42, the boundary between thethird insertion area 48 and an image portion different from theinsertion area 48 is represented by a solid line 48A as a continuousline. The insertion area 48 includes a line 48B which is formed of adashed line that divides the insertion area 48 into an area 49A and anarea 49B. The insertion area 48 does not include anything other than theline 48B. Accordingly, the control section 10A determines that theboundary of the third insertion area is not represented by adiscontinuous line (NO in step S14), and also determines that the thirdinsertion area includes a dividing line (YES in step S16). When theabove-described determination is made by the control section 10A, theimage processing section 10E executes, on the third insertion image 56,processing (hereinafter referred to as “duplicate processing”) ofchanging the size of the insertion image 56 in matching with the size ofeach of the areas 49A and 49B and inserting the insertion image 56 withthe changed size into each of the area 49A and the area 49B (step S18).

Specifically, the image processing section 10E first duplicates theinsertion image 56 so that the insertion image 56 detected by theinsertion image detection section 10D is duplicated by the number ofareas divided by the line 48B. In this case, the number of areas dividedby the line 48B is two, and thus the control section 10A generates onecopy of the insertion image 56.

Since the insertion image 56 is larger than the area 49A and the area49B, the image processing section 10E executes, on the detectedinsertion image 56, the processing of reducing the size of the insertionimage 56 so that the size of the insertion image 56 matches the size ofthe area 49A. The image processing section 10E further executes, on theduplicated insertion image 56, the processing of reducing the size ofthe insertion image 56 so that the size of the insertion image 56matches the size of the area 49B.

The image processing section 10E generates a combined image by combiningthe two insertion images 56 so that the positions of the insertionimages 56 subjected to the reduction processing respectively correspondto the positions of the area 49A and the area 49B. Thereafter, theduplicate processing ends.

After the duplicate processing is executed, the control section 10Adetermines that the third insertion area does not include any triangularfigure, any circular figure, and any diamond-shaped figure (NO in stepS19, step S21, and step S24), and stores the combined image obtainedafter the duplicate processing is executed in the HDD 19 as the thirdinsertion image (step S26).

After the third insertion image is stored, the control section 10Adetermines whether the first image includes the next area (step S27).Since the first image 42 does not include a fourth insertion area, thecontrol section 10A determines that the first image does not include thenext area (NO in step S27). When the above-described determination ismade by the control section 10A, the image processing section 10Egenerates the third image on which the insertion images 52, 54, and 56are inserted into the insertion areas 44, 46, and 48 of the first image42, respectively (step S29).

Specifically, the image processing section 10E generates the third imageby combining the first image with the first to third insertion imagesstored in the HDD 19 so that the insertion images 52, 54, and 56 areinserted into the insertion areas 44, 46, and 48, respectively. Afterthe third image is generated, the image insertion processing ends.

When the user inputs an instruction to print the image, which isobtained after the image insertion processing has been executed, throughthe operation unit 15, the control section 10A causes, for example, theimage forming unit 12 to print the third image on recording paper.

FIG. 9 illustrates an example of the third image. Referring to FIG. 9, athird image 72 is printed on recording paper 70. The third image 72includes images 74, 76, and 78 in that order. The image 74 is an imageobtained by directly inserting the insertion image 52 into the insertionarea 44 of the first image 42 without changing the size of the insertionimage 52. The image 76 is an image obtained by inserting, into theinsertion area 46 of the first image 42, the insertion image 54 whosesize has been changed so as to match the size of the insertion area 46.The image 76 is an image obtained by inserting, into each of the area49A and the area 49B of the first image 42, the insertion image 56 whosesize has been changed so as to match the size of each of the area 49Aand the area 49B.

(2) When the First and Second Images are Acquired Through theCommunication Unit 21

First, the user creates the first image by an input operation on theoperation unit of the PC 22. In creating the first image, the userconducts an input operation on the operation unit of the PC 22, therebycausing a display of the PC 22 to display a first screen based on thefirst image.

FIG. 10 illustrates another example of the first image. Referring toFIG. 10, a first screen 80 is a screen to be displayed on the displaybased on a first image 82. The data structure of the first image 82 willbe described below using the first screen 80. The first image 82includes insertion areas 84, 86, 88, 90, and 92 in that order from oneend side in a third predetermined direction toward the other end side inthe third direction. The insertion areas 84, 86, 88, 90, and 92 arerectangular areas each representing a position where an image isinserted.

In the present embodiment, the image processing section 10E executes, asthe image insertion processing, image processing on the insertion areasin order from the insertion area located at one end side in the thirddirection toward the insertion area located at the other end side in thethird direction. Hereinafter, the insertion areas are each denoted by anordinal number in the order in which the image insertion processing isexecuted.

After the first image is created, the user creates the second image byan input operation on the operation unit of the PC 22. In creating thesecond image, the user performs the input operation on the operationunit of the PC 22 to display a second screen based on the second imageon the display of the PC 22.

FIG. 11 illustrates another example of the second image. Referring toFIG. 11, a second screen 100 is a screen to be displayed on the displaybased on a second image 101. The data structure of the second image 101will be described below using the second screen 100. The second image101 includes insertion images 102, 104, 106, 108, and 110 to be insertedinto the insertion areas 84, 86, 88, 90, and 92 in that order from oneend side in a fourth predetermined direction toward the other end sidein the fourth direction. All the insertion images 102, 104, 106, 108,and 110 are RGB color images.

In the present embodiment, the image processing section 10E executes, asthe image insertion processing, image processing on the insertion imagesin order from the insertion image located at one end side in the fourthdirection toward the other end side in the fourth direction.Hereinafter, the insertion images are each denoted by an ordinal numberin the order in which the image insertion processing is executed.

After creating the first image 82 and the second image 101, the usersends an instruction for transmitting the first image 82 and the secondimage 101 to the image forming apparatus 1 by the input operation on theoperation unit of the PC 22. In accordance with the above-describedinstruction, the PC 22 transmits the first image 82 and the second image101 to the image forming apparatus 1.

Upon receiving the first image 82 and the second image 101 through thecommunication unit 21, the image acquisition section 10B acquires andstores the received first image 82 and second image 101 in the HDD 19.

As described above, the image acquisition section 10B acquires the firstimage 82 and the second image 101 through the communication unit 21.

After the first image 82 and the second image 101 are transmitted, theuser checks the home screen 30 displayed on the display 16 of the imageforming apparatus 1, and presses the key 34 to use the image insertionfunction. When the key 34 is pressed, the control section 10A acceptsthe selection of the image insertion function, and causes the display 16to display, for example, a message to prompt the user to select thefirst image and the second image.

Referring to FIG. 3, when the user who has checked the message selectsthe first image 82 and the second image 101 stored in the HDD 19 by theinput operation through the operation unit 15, the control section 10Adetermines that the first image and the second image have already beenacquired (YES in step S10), and substitutes “1” into the variable “i”and also substitutes “1” into the variable “j” (step S11).

When the control section 10A performs the substitution described above,the insertion area detection section 10C detects the insertion areas 84,86, 88, 90, and 92 from the first image 82, and the insertion imagedetection section 10D detects the insertion images 102, 104, 106, 108,and 110 from the second image 101 (step S12). In detecting the insertionareas, the insertion area detection section 10C detects a line thatforms the boundary of the insertion area, the type of the line, thepresence or absence of a line and figure included in the insertion area,and the type of the figure.

The control section 10A determines whether the number of insertion areasdetected by the insertion area detection section 10C matches the numberof insertion images detected by the insertion image detection section10D (step S13). In this case, the number of the insertion areas 84, 86,88, 90, and 92 is “5” and the number of the insertion images 102, 104,106, 108, and 110 is “5”. Accordingly, the control section 10Adetermines that the number of the insertion areas is equal to the numberof the insertion images (YES in step S13), and also determines whetherthe boundary of the first insertion area is represented by adiscontinuous line (step S14).

If the control section 10A determines that the number of the insertionareas does not match the number of the insertion images (NO in stepS13), the control section 10A executes the processing of step S15 in asimilar manner as described above.

(2-1) When the Boundary of the Area is Represented by a Solid Line

(2-1-1) When the Area Includes a Triangular Figure

Referring to FIG. 10, in the first image 82, the boundary between thefirst insertion area 84 and an image portion different from theinsertion area 84 is represented by a solid line 84A as a continuousline. The insertion area 84 includes a triangular figure 84B, and doesnot include any other line segments and figures. A predetermined vertexP1 of the triangular figure 84B is located on one end side in the thirddirection in the insertion area 84. The orientation of such a triangleis hereinafter referred to as an “upward direction”.

Accordingly, the control section 10A determines that the boundary of thefirst insertion area is not represented by a discontinuous line (NO instep S14), and also determines that the first insertion area does notinclude a dividing line (NO in step S16). When the above-describeddetermination is made by the control section 10A, the image processingsection 10E executes the size change processing on the first insertionimage 102 to change the size of the insertion image 102 so as to matchthe size of the insertion area 84 (step S17).

Specifically, since the insertion image 102 is smaller than theinsertion area 84, the image processing section 10E executes processingof enlarging the size of the insertion image 102, which is detected bythe insertion image detection section 10D, so that the size of theinsertion image 102 matches the size of the insertion area 84.

After the size change processing is executed, the control section 10Adetermines that the first insertion area 84 includes a triangular figure(YES in step S19). When the above-described determination is made by thecontrol section 10A, the image processing section 10E executesprocessing (hereinafter referred to as “rotation processing”) on theinsertion image 102 obtained after the size change processing isperformed, of rotating the insertion image 102 by an amountcorresponding to a predetermined angle depending on the orientation ofthe triangle (step S20).

In this case, the HDD 19 preliminarily stores a rotation anglecorresponding to the orientation of the triangle. In the presentembodiment, the HDD 19 stores “180 degrees clockwise” as the rotationangle corresponding to the “upward direction”, stores “0 degrees” as therotation angle corresponding to the “downward direction”, stores “90degrees counterclockwise” as the rotation angle corresponding to the“rightward direction”, and stores “90 degrees clockwise” as the rotationangle corresponding to the “leftward direction”.

In this case, since the figure 84B is an upward triangle, the imageprocessing section 10E executes the rotation processing on the insertionimage 102, which is obtained after the size change processing isexecuted, to rotate the insertion image 102 by 180 degrees clockwise.

After the rotation processing is executed, the control section 10Adetermines that the first insertion area 84 does not include anycircular figure and any diamond-shaped figure (NO in step S21 and stepS24), and stores the insertion image 102, which is obtained after therotation processing is executed, in the HDD 19 as the first insertionimage (step S26).

After the first insertion image is stored, the control section 10Aexecutes the processing of steps S27 and S28 in a similar manner asdescribed above. As a result, the variable “i” becomes “2” and thevariable “j” becomes “2”.

(2-1-2) When the Area Includes a Circular Figure

Referring to FIG. 10, in the first image 82, the boundary between thesecond insertion area 86 and an image portion different from theinsertion area 86 is represented by a solid line 86A as a continuousline. The insertion area 86 includes a circular figure 86B and does notinclude any other line segments and figures.

Accordingly, the control section 10A determines that the boundary of thesecond insertion area is not represented by a discontinuous line (NO instep S14), and also determines that the second insertion area does notinclude a dividing line (NO in step S16). When the above-describeddetermination is made by the control section 10A, the image processingsection 10E executes the size change processing on the second insertionimage 104 to change the size of the insertion image 104 so as to matchthe size of the insertion area 86 (step S17).

Specifically, since the insertion image 104 is larger than the insertionarea 86, the image processing section 10E executes the processing ofreducing the size of the insertion image 104, which is detected by theinsertion image detection section 10D, so that the size of the insertionimage 104 matches the size of the insertion area 86.

After the size change processing is executed, the control section 10Adetermines that the second insertion area does not include anytriangular figure (NO in step S19), determines that the second insertionarea includes a circular figure (YES in step S21), and determineswhether the second insertion image 104 is a color image (step S22).

Since the insertion image 104 is an RGB color image, the control section10A determines that the second insertion image 104 is a color image (YESin step S22). When the above-described determination is made by thecontrol section 10A, the image processing section 10E executes, on theinsertion image 104 obtained after the size change processing isexecuted, processing (hereinafter referred to as “monochrome conversionprocessing”) of converting the insertion image 104 from the color imageinto a black-and-white image (step S23).

The method for implementing the monochrome conversion processing is notparticularly limited, as long as the method is generally used in thefield to which the present disclosure pertains. For example, an NTSCweighted average method, or an intermediate value method that uses anintermediate value of RGB can be used. When the second insertion image104 is not a color image (NO in step S22), the monochrome conversionprocessing is not executed and the processing of step S24 is executed.

After the monochrome conversion processing is executed, the controlsection 10A determines that the second insertion area does not includeany diamond-shaped figure (NO in step S24), and stores the insertionimage 104, which is obtained after the monochrome conversion processingis executed, in the HDD 19 as the second insertion image 104 (step S26).

After the second insertion image 104 is stored, the control section 10Aexecutes the processing of steps S27 and S28 in a similar manner asdescribed above. As a result, the variable “i” becomes “3” and thevariable “j” becomes “3”.

(2-1-3) When the Area Includes a Diamond-Shaped Figure

Referring to FIG. 10, in the first image 82, the boundary between thethird insertion area 88 and an image portion different from theinsertion area 88 is represented by a solid line 88A as a continuousline. The insertion area 88 includes a diamond-shaped figure 88B anddoes not include any other line segments and figures.

Accordingly, the control section 10A determines that the boundary of thethird insertion area is not represented by a discontinuous line (NO instep S14), and also determines that the third insertion area does notinclude a dividing line (NO in step S16). When the above-describeddetermination is made by the control section 10A, the image processingsection 10E executes the size change processing on the third insertionimage 106 to change the size of the insertion image 106 so as to matchthe size of the insertion area 88 (step S17).

Specifically, since the insertion image 106 is larger than the insertionarea 88, the image processing section 10E executes the processing ofreducing the size of the insertion image 106, which is detected by theinsertion image detection section 10D, so that the size of the insertionimage 106 matches the size of the insertion area 86.

After the size change processing is executed, the control section 10Adetermines that the third insertion area does not include any triangularfigure and any circular figure (NO in step S19 and step S21), and alsodetermines that the third insertion area includes a diamond-shapedfigure (YES in step S24). When the above-described determination is madeby the control section 10A, the image processing section 10E executes,on the insertion image 106 obtained after the size change processing isexecuted, processing (hereinafter referred to as “color reversalprocessing”) of converting the hue of the insertion image 106 into acomplementary color (step S25).

The method for implementing the color reversal processing is notparticularly limited, as long as the method is generally used in thefield to which the present disclosure pertains. For example, a method inwhich correspondence relationships between RGB values indicating apredetermined hue and RGB values indicating the complementary color ofthe hue are stored as a look-up table can be used.

After the color reversal processing is executed, the control section 10Astores the insertion image 106, which is obtained after the colorreversal processing is executed, in the HDD 19 as a third insertionimage (step S26). After the third insertion image is stored, the controlsection 10A executes the processing of steps S27 and S28 in a similarmanner as described above. As a result, the variable “i” becomes “4” andthe variable “j” becomes “4”.

(2-1-4) When the Area Includes a Plurality of Figures

Referring to FIG. 10, in the first image 82, the boundary between thefourth insertion area 90 and an image portion different from theinsertion area 90 is represented by a solid line 90A as a continuousline. The insertion area 90 includes a triangular figure 90B and adiamond-shaped figure 90C, but does not include any other line segmentsand figures. A predetermined vertex P2 of the triangular figure 90B islocated on one end side in a fifth direction, which is perpendicular tothe third direction, in the insertion area 90. The orientation of such atriangle is hereinafter referred to as the “rightward direction”.

Accordingly, the control section 10A determines that the boundary of thefourth insertion area 90 is not represented by a discontinuous line (NOin step S14), and also determines that the fourth insertion area 90 doesnot include a dividing line (NO in step S16). When the above-describeddetermination is made by the control section 10A, the image processingsection 10E executes the size change processing on the fourth insertionimage 108 to change the size of the insertion image 108 so as to matchthe size of the insertion area 90 (step S17).

Specifically, since the insertion image 108 is smaller than theinsertion area 90, the image processing section 10E executes processingof enlarging the size of the insertion image 108, which is detected bythe insertion image detection section 10D, so that the size of theinsertion image 108 matches the size of the insertion area 90.

After the size change processing is executed, the control section 10Adetermines that the fourth insertion area 90 includes a triangularfigure (YES in step S19). When the above-described determination is madeby the control section 10A, the image processing section 10E executesthe rotation processing on the insertion image 108, which is obtainedafter the size change processing is executed, to rotate the insertionimage 108 by an amount corresponding to a predetermined angle dependingon the orientation of the triangle (step S20).

In this case, the figure 90B is a rightward triangle. Accordingly, theimage processing section 10E executes the rotation processing on theinsertion image 108, which is obtained after the size change processingis executed, to rotate the insertion image 108 by 90 degreescounterclockwise.

After the rotation processing is executed, the control section 10Adetermines that the fourth insertion area 90 does not include anycircular figure (NO in step S21), and also determines that the fourthinsertion area 90 includes a diamond-shaped figure (YES in step S24).When the above-described determination is made by the control section10A, the image processing section 10E executes, on the insertion image108 obtained after the rotation processing is executed, the colorreversal processing of changing the hue of the insertion image 108 intoa complementary color (step S25).

After the color reversal processing is executed, the control section 10Astores the insertion image 108, which is obtained after the colorreversal processing is executed, in the HDD 19 as the fourth insertionimage (step S26).

After the fourth insertion image is stored, the control section 10Aexecutes the processing of steps S27 and S28 in a similar manner asdescribed above. As a result, variable “i” becomes “5” and the variable“j” becomes “5”.

(2-2) When the Boundary of the Area is Represented by a DiscontinuousLine and the Area Includes a Plurality of Figures

Referring to FIG. 10, in the first image 82, the boundary between thefifth insertion area 92 and an image portion different from theinsertion area 92 is represented by a broken line 92A as a discontinuousline. The insertion area 92 includes a triangular figure 92B and acircular figure 92C, but does not include any other line segments andfigures. A predetermined vertex P3 of the triangular figure 92B islocated on the other end side in the fifth direction in the insertionarea 92. The orientation of such a triangle is hereinafter referred toas the “leftward direction”.

Accordingly, the control section 10A determines that the boundary of thefifth insertion area 92 is represented by a discontinuous line (YES instep S14), and also determines that the fifth insertion area 92 includesa triangular figure (YES in step S19). When the above-describeddetermination is made by the control section 10A, the image processingsection 10E executes the rotation processing on the fifth insertionimage 110 to rotate the insertion image 110 by a predetermined angledepending on the orientation of the triangle (step S20).

Specifically, since the figure 92B is a leftward triangle, the imageprocessing section 10E executes the rotation processing on the insertionimage 110, which is detected by the insertion image detection section10D, to rotate the insertion image 110 by 90 degrees clockwise.

After the rotation processing is executed, the control section 10Adetermines that the fifth insertion area 92 includes a circular figure(YES in step S21), and also determines whether the fifth insertion imageis a color image (step S22).

Since the insertion image 110 is an RGB color image, the control section10A determines that the fifth insertion image is a color image (YES instep S22). When the above-described determination is made by the controlsection 10A, the image processing section 10E executes, on the insertionimage 110 obtained after the rotation processing is executed, themonochrome conversion processing of converting the insertion image 110from the color image into the black-and-white image (step S23).

After the monochrome conversion processing is executed, the controlsection 10A determines that the fifth insertion area 92 does not includeany diamond-shaped figure (NO in step S24), and stores the insertionimage 110, which is obtained after the monochrome conversion processingis executed, in the HDD 19 as the fifth insertion image (step S26).

After the fifth insertion image is stored, the control section 10Adetermines whether the first image 82 includes the next area (step S27).Since the first image 82 does not include a sixth insertion area, thecontrol section 10A determines that the first image 82 does not includethe next area (NO in step S27). When the above-described determinationis made by the control section 10A, the image processing section 10Egenerates the third image by inserting the insertion images 102, 104,106, 108, and 110 into the insertion areas 84, 86, 88, 90, and 92,respectively, of the first image 82 (step S29).

Specifically, the control section 10A generates the third image bycombining the first image with the first to fifth insertion imagesstored in the HDD 19 so that the insertion images 102, 104, 106, 108,and 110 are inserted into the insertion areas 84, 86, 88, 90, and 92,respectively. After the third image is generated, the image insertionprocessing ends.

When the user inputs an instruction to print the image, which isobtained after the image insertion processing is executed, through theoperation unit 15, the control section 10A causes, for example, theimage forming unit 12 to print the third image on recording paper.

FIG. 12 illustrates another example of the third image. Referring toFIG. 12, a third image 112 is printed on recording paper 103. The thirdimage 112 includes images 114, 116, 118, 120, and 122 in that order.

The image 114 is obtained in such a manner that the insertion image 102,which is enlarged so as to match the size of the insertion area 84 andis then rotated by 180 degrees clockwise, is inserted into the insertionarea 84 of the first image 82.

The image 116 is obtained in such a manner that the insertion image 104,which is reduced so as to match the size of the insertion area 86 and isthen converted from the color image into the black-and-white image, isinserted into the insertion area 86 of the first image 82.

The image 118 is obtained in such a manner that the insertion image 106,which is reduced so as to match the size of the insertion area 88 andwhose hue is converted into a complementary color, is inserted into theinsertion area 88 of the first image 82.

The image 120 is obtained in such a manner that the insertion image 108,which is enlarged so as to match the size of the insertion area 90 andis then rotated by 90 degrees counterclockwise and whose hue isconverted into a complementary color, is inserted into the insertionarea 90 of the first image 82.

The image 122 is obtained in such a manner that the insertion image 110,which is rotated by 90 degrees clockwise and is then converted from thecolor image into the black-and-white image, is inserted into theinsertion area 92 of the first image 82. In the image 122, the insertionimage 110 is directly inserted into the insertion area 92 withoutchanging the size of the insertion image 110. Accordingly, a part of theinsertion image 110 is inserted into the insertion area 92.

Incidentally, in the general techniques described above, the user needsto perform a touch operation for designating an object image and aposition where the object image is combined on a touch panel so as toacquire a desired combined image, which requires time and labor.

According to the embodiment described above, on the other hand, forexample, the image acquisition section 10B acquires the first image 42and the second image 51, the insertion area detection section 10Cdetects the insertion area 44 from the first image 42, the insertionimage detection section 10D detects the insertion image 52 from thesecond image 51, and the image processing section 10E generates thethird image 72 by inserting the detected insertion image 52 into thedetected insertion area 44. Alternatively, for example, the imageacquisition section 10B acquires the first image 82 and the second image101, the insertion area detection section 10C detects the insertion area84 from the first image 82, the insertion image detection section 10Ddetects the insertion image 102 from the second image 101, and the imageprocessing section 10E generates the third image 112 by inserting thedetected insertion image 102 into the detected insertion area 84.

Accordingly, the user can easily create an image in which a desiredimage is inserted at a desired position, without performing an inputoperation for instructing an image to be inserted and a position wherethe image is inserted.

Further, according to the embodiment described above, the insertion areadetection section 10C is configured to detect a line for the insertionarea and the type of the line, and the image processing section 10E isconfigured to insert the insertion image into the insertion area byexecuting predetermined image processing (hereinafter referred to as“first image processing”) on the insertion image depending on thedetected type of the line in the case of generating the third image.

Thus, the user can cause the image processing section 10E to executedesired image processing only by representing the boundary of each areausing a predetermined line type. Consequently, time and labor forissuing an instruction for executing desired image processing throughthe operation unit 15 can be reduced, which leads to a furtherimprovement in user-friendliness.

Further, according to the embodiment described above, when the linetypes detected by the insertion area detection section 10C are thebroken lines 44A and 92A as discontinuous lines, the image processingsection 10E inserts the insertion images 52 and 110 into the insertionareas 44 and 92 without executing the processing of changing the sizesof the insertion images 52 and 110.

Thus, the user can cause the image processing section 10E to skip thesize change processing only by representing the boundary of each areausing a discontinuous line. Consequently, time and labor for issuing aninstruction to skip the size change processing through the operationunit 15 can be reduced, which leads to a further improvement inuser-friendliness.

Further, according to the embodiment described above, when the linetypes detected by the insertion area detection section 10C are the solidlines 46A and 84A and the like as continuous lines, the image processingsection 10E executes, as the first image processing, the size changeprocessing of changing the size of the insertion images 54, 102, and thelike so as to match the sizes of the insertion areas 46, 84, and thelike.

Thus, the user can cause the image processing section 10E to execute thesize change processing only by representing the boundary of eachinsertion area as a continuous line. Consequently, time and labor forissuing an instruction for executing the size change processing throughthe operation unit 15 can be reduced, which leads to a furtherimprovement in user-friendliness.

Further, according to the embodiment described above, when the insertionarea 48 includes the line 48B that divides the insertion area 48 intothe area 49A and the area 49B, the image processing section 10E changesthe size of the insertion image 56 so as to match the size of each ofthe area 49A and the area 49B, executes, on the insertion image 56, theduplicate processing of inserting the insertion image 56 with thechanged size into each of the area 49A and the area 49B, and inserts theinsertion image 56 into the insertion area 48.

Thus, the user can cause the image processing section 10E to execute theduplicate processing only by setting the area so as to include adividing line. Consequently, time and labor for issuing an instructionto execute the duplicate processing through the operation unit 15 can bereduced, which leads to a further improvement in user-friendliness.

Further, according to the embodiment described above, in the case ofgenerating the third image, the image processing section 10E executespredetermined image processing (hereinafter also referred to as “secondimage processing”) on the insertion image depending on the type of thefigure included in the insertion area, and generates the third image byinserting the insertion image into the insertion area.

Thus, the user can cause the image processing section 10E to executedesired image processing only by setting the insertion area so as toinclude a figure of a predetermined type. Consequently, time and laborfor issuing an instruction for executing desired image processingthrough the operation unit 15 can be reduced, which leads to a furtherimprovement in user-friendliness.

Further, according to the embodiment described above, when the insertionareas 84, 90, and 92 include the triangular figures 84B, 90B, and 92B,respectively, the image processing section 10E executes, as the secondimage processing, rotation processing to rotate the insertion images102, 108, and 110 depending on the orientation of the triangle.

Thus, the user can cause the image processing section 10E to execute therotation processing only by setting the insertion area so as to includea triangular figure. Consequently, time and labor for issuing aninstruction to execute the rotation processing though the operation unit15 can be reduced, which leads to a further improvement inuser-friendliness.

Further, according to the embodiment described above, when the insertionareas 86 and 92 include the circular figures 86B and 92C, respectively,and the insertion images 104 and 110 are color images, the imageprocessing section 10E executes, as the second image processing, themonochrome conversion processing of converting the insertion images 104and 110 from the color images into the black-and-white images.

Thus, the user can cause the image processing section 10E to execute themonochrome conversion processing only by setting the insertion area soas to include a circular figure. Consequently, time and labor forissuing an instruction for executing the monochrome conversionprocessing through the operation unit 15 can be reduced, which leads toa further improvement in user-friendliness.

Further, according to the embodiment described above, when the insertionareas 88 and 90 include the diamond-shaped figures 88B and 90C,respectively, the image processing section 10E executes, as the secondimage processing, the color reversal processing of changing the hue ofeach of the insertion images 106 and 108 into a complementary color.

Thus, the user can cause the image processing section 10E to execute thecolor reversal processing only by setting the insertion area so as toinclude a diamond-shaped figure. Consequently, time and labor forissuing an instruction to execute the color reversal processing throughthe operation unit 15 can be reduced, which leads to a furtherimprovement in user-friendliness.

Further, according to the embodiment described above, when the number ofinsertion areas detected by the insertion area detection section 10Cdoes not match the number of insertion images detected by the insertionimage detection section 10D, the control section 10A causes the display16 to display the error screen 60 including the message 62 indicating awarning.

Thus, the user can easily recognize that the number of insertion areasdoes not match the number of insertion images, making it possible toeasily prevent generation of an image different from a desired image.

Further, according to the embodiment described above, the image formingunit 12 forms the third images 72 and 112 on recording paper, so thatthe user can easily acquire a desired image.

FIRST MODIFIED EXAMPLE

The configuration of an image forming apparatus 1 including an imageprocessing apparatus 2 according to a first modified example of thepresent disclosure is similar to the configuration of the image formingapparatus 1 according to the embodiment described above, except for theconfiguration of the error screen. The difference between the firstmodified example and the embodiment described above will be describedbelow.

FIG. 13 illustrates another example of the error screen. Referring toFIG. 13, an error screen 130 includes a message 132 indicating a warningthat “The number of insertion images does not match the number ofinsertion areas. Do you continue processing?”. The error screen 130 alsoincludes, as software keys, a key 134 for sending an instruction tocontinue the image insertion processing, and a key 136 for sending aninstruction to cancel the image insertion processing.

When the user who has checked the error screen 130 presses the key 134and the number of insertion areas included in the first image is greaterthan the number of insertion image, the control section 10A executes theimage insertion processing in a similar manner as described above afterdeleting an excess number of insertion areas from the first image. Theexcess number of insertion areas are deleted in ascending order of thenumber added to each insertion area. The deletion of the insertion areasas described above may be executed not only when the key 134 is pressed,but also when the number of insertion areas does not match the number ofinsertion images without displaying the error screen 130.

When the user presses the key 134 and the number of insertion areasincluded in the first image is less than the number of insertion images,the control section 10A executes the image insertion processing in asimilar manner as described above. In this case, the image insertionprocessing is not executed on the excess number of insertion images.

OTHER MODIFIED EXAMPLES

According to the embodiment described above, the line types include asolid line as a continuous line and a broken line as a discontinuousline. However, the present disclosure is not limited to the embodiment.The line types are not particularly limited, as long as the line typesare generally used. For example, the line types may include a wavy lineor double line as a continuous line, and may include a dashed-dottedline or dashed-two dotted line as a discontinuous line.

Further, according to the embodiment described above, the types offigures included in each insertion area include a triangular shape, acircular shape, and a diamond shape. However, the present disclosure isnot limited to the embodiment. The types of figures are not particularlylimited, as long as the types of figures are generally used. Forexample, the types of figures may include a hexagonal shape orelliptical shape.

Further, according to the embodiment described above, the first imageprocessing includes size change processing, and the second imageprocessing includes rotation processing, monochrome conversionprocessing, or color reversal processing. However, the presentdisclosure is not limited to the embodiment. The first and second imageprocessing is not particularly limited, as long as the image processingis generally used in the field to which the present disclosure pertains.Examples of the image processing include color conversion processing,noise reduction processing, and color correction processing.

Further, according to the embodiment described above, the area 48 isdivided into two areas by the line 48B. However, the present disclosureis not limited to the embodiment. For example, the area may be dividedinto three areas by two dividing lines. In this case, the duplicateprocessing is executed in such a manner that insertion images areinserted into the three divided areas, respectively.

Further, according to the embodiment described above, the imageinsertion processing is executed without a user instruction through theoperation unit 15. However, the present disclosure is not limited to theembodiment described above. For example, the image processing apparatus2 may be configured to include functions of executing the imageinsertion processing described above and executing the image insertionprocessing in accordance with a user instruction through the operationunit 15.

In this case, a thumbnail image corresponding to the first image andthumbnail images corresponding to all insertion images are displayed onthe display 16. The user drags the thumbnail image corresponding to thedesired insertion image onto a desired insertion area in the thumbnailimage corresponding to the first image, making it possible to instructan image to be inserted and a position where the image is inserted.

The present disclosure is not limited to the configurations of theembodiment described above and can be modified in various ways. Forexample, in the embodiment described above, a color multi-functionperipheral has been described as an embodiment of the image formingapparatus according to the present disclosure. However, this is merelyan example. Other image forming apparatuses, such as a monochromemulti-function peripheral or other electronic devices such as a printer,a copying machine, or a facsimile device may be used.

The configurations and processing illustrated in the embodimentdescribed above with reference to FIGS. 1 to 13 are merely oneembodiment of the present disclosure, and are not intended to limit theconfigurations and processing according to the present disclosure.

While the present disclosure has been described in detail with referenceto the embodiments thereof, it would be apparent to those skilled in theart the various changes and modifications may be made therein within thescope defined by the appended claims.

What is claimed is:
 1. An image processing apparatus comprising: animage input unit through which a first image including an insertion arearepresenting a position for inserting an image and a second imagedifferent from the first image are input; and a control unit including aprocessor and configured to function, when the processor executes acontrol program, as: an image acquisition section that acquire the firstimage and the second image input through the image input unit; aninsertion area detection section that detect the insertion area from thefirst image acquired by the image acquisition section; an insertionimage detection section that detect, from the second image acquired bythe image acquisition section, an insertion image to be inserted intothe insertion area; and an image processing section that generates athird image by inserting the insertion image detected by the insertionimage detection section into the insertion area detected by theinsertion area detection section.
 2. The image processing apparatusaccording to claim 1, wherein in the first image, a boundary between theinsertion area and an image portion different from the insertion area isrepresented by a line, the insertion area detection section detects theline and a type of the line, and the image processing section generatesthe third image by executing image processing predetermined depending onthe detected type of the line on the insertion image and inserting theinsertion image executed the predetermined image processing into theinsertion area.
 3. The image processing apparatus according to claim 2,wherein the type of the line includes a discontinuous line, and in acase where the type of the line detected by the insertion area detectionsection is the discontinuous line, the image processing sectiongenerates the third image by inserting the insertion image into theinsertion area without executing processing of changing a size of theinsertion image.
 4. The image processing apparatus according to claim 2,wherein the type of the line includes a continuous line, and in a casewhere the type of the line detected by the insertion area detectionsection is the continuous line, the image processing section executes,as the predetermined image processing, processing of changing a size ofthe insertion image in matching with a size of the insertion area. 5.The image processing apparatus according to claim 1, wherein in a casewhere the insertion area includes a line that divides the insertion areainto a plurality of areas, the image processing section generates thethird image by changing a size of the insertion image in matching with asize of each of the plurality of areas divided by the line and insertingthe insertion image with the changed size into each of the plurality ofareas.
 6. The image processing apparatus according to claim 1, whereinthe insertion area includes a figure, and the image processing sectiongenerates the third image by executing image processing predetermineddepending on a type of the figure on the insertion image and insertingthe insertion image executed the predetermined image processing into theinsertion area.
 7. The image processing apparatus according to claim 6,wherein the type of the figure includes a triangular shape, and in acase where the insertion area includes a triangular figure, the imageprocessing section executes, as the predetermined image processingdepending on the type of the figure, processing of rotating theinsertion image depending an orientation of the triangular figure. 8.The image processing apparatus according to claim 6, wherein the type ofthe figure includes a circular shape, and in a case where the insertionarea includes a circular figure and the insertion image is a colorimage, the image processing section executes, as the predetermined imageprocessing depending on the type of the figure, processing of convertingthe insertion image from the color image into a black-and-white image.9. The image processing apparatus according to claim 6, wherein the typeof the figure includes a diamond shape, and in a case where theinsertion area includes a diamond-shaped figure, the image processingsection executes, as the predetermined image processing depending on thetype of the figure, processing of changing a hue of the insertion imageinto a complementary color.
 10. The image processing apparatus accordingto claim 1, further comprising a display, wherein the control unitfurther functions as a control section, and in a case where theinsertion areas detected by the insertion area detection section are notequal in number to the insertion images detected by the insertion imagedetection section, the control section causes the display to display awarning.
 11. The image processing apparatus according to claim 10,wherein in a case where the insertion areas is greater in number thanthe insertion images, the control section deletes an excess number ofthe insertion areas from the first image.
 12. The image processingapparatus according to claim 1, wherein the image input unit is an imagereading unit configured to read a document and generate an image. 13.The image processing apparatus according to claim 1, wherein the imageinput unit is a communication unit configured to communicate with aninformation processing apparatus connected via a network.
 14. An imageforming apparatus comprising: the image processing apparatus accordingto claim 1; and an image forming unit configured to form the third imageon a recording medium.